<link rel="stylesheet" href="css/timesRoom/timesRoomManage.css"/>

<div class="row">
	<div id="pageBody_timesRoom" class="col-sm-12 no-padding">
		<div class="well well-sm no-margin">
			<div class="clearfix">
				<div class="pull-left">
					<label>
						<input class="ace" type="radio" name="roomType" value="1" checked/>
						<span class="lbl" data-i18n="全部">全部</span>
					</label>
					<label>
						<input class="ace" type="radio" name="roomType" value="2" />
						<span class="lbl" data-i18n="包房">包房</span>
					</label>
					<label>
						<input class="ace" type="radio" name="roomType" value="3" />
						<span class="lbl" data-i18n="大厅">大厅</span>
					</label>
					<label>
						<input class="ace" type="radio" name="roomType" value="4" />
						<span class="lbl" data-i18n="女厅">女厅</span>
					</label>
					<label>
						<input class="ace" type="radio" name="roomType" value="5" />
						<span class="lbl" data-i18n="麻将室">麻将室</span>
					</label>
				</div>
				<div class="pull-right">
					<label>
						<input class="ace" type="checkbox" name="" id=""/>
						<span class="lbl" data-i18n="脏房报警">脏房报警</span>
					</label>
					<label>
						<input class="ace" type="checkbox" name="" id=""/>
						<span class="lbl" data-i18n="超时报警">超时报警</span>
					</label>
					<div class="btn-group">
						<button id="btnOpen" class="btn btn-sm btn-info" data-i18n="开牌">
							开牌
						</button>
					</div>
					<div class="btn-group">
						<button id="btnClose" class="btn btn-sm" data-i18n="关闭">关闭</button>
					</div>
				</div>
			</div>
		</div>
		<div id="roomContainer">
			<div class="room-box">
				<div class="room-item">
					001
				</div>
				<div class="room-item">
					002
				</div>
			</div>
		</div>
	</div>
	<div id="pageFooter_timesRoom" class="col-sm-12">
		
	</div>
</div>
<script type="text/javascript"> 
    //加载资源文件
    var scripts =   [
		'js/plugin/jsonsql.js',
		"js/plugin/jquery.contextmenu.r2.js",
		"",
    ];
     //全窗口变量
	var ins_argjson={};
    $(".page-content-area").ace_ajax("loadScripts", scripts, function() {
        ins_argjson.operGrid = 1;
		var session = {session:{}};
		ins_argjson.session = session.session;
		
		setSize();
		
		jf_retrieve();
		
		jf_bindEvent();
	})
	
	function setSize(){
		var top = $("#roomContainer").offset().top
		var height = $(window).height();
		var h = height- top - 80;
		$("#roomContainer").css({"height":h,"overflow-y":"auto"});
	}

    function jf_retrieve(){
		
		if(!$.isFunction($().timesRoom_entity)){
			$.ajaxSetup({ async: false, cache: false });
            $.getScript("js/timesRoom/jquery.service.timesRoom_entity.js");
            $.ajaxSetup({ async: true});
		}
		$("").timesRoom_entity({
			roomContainer : "roomContainer",
			dataBack : function(){
				
			},
			closeBack : function(){
				
			}
		});

    }
    
    function jf_bindEvent(){
		//关闭
		$("#btnClose").click(function(){
			history.go(-1);
		})
		
		//开牌
		$("#btnOpen").click(function(){
			
		})

		//窗口大小变化
		$(window).resize(function(){
			setSize();
		})
	}
</script>